package b.p.b;

import android.content.Context;
import android.util.DisplayMetrics;
import android.view.View;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView.v.a;
import androidx.recyclerview.widget.RecyclerView.w;

/* compiled from: SnapHelper */
public class f0 extends t {
    public final /* synthetic */ e0 q;

    public f0(e0 e0Var, Context context) {
        this.q = e0Var;
        super(context);
    }

    public void c(View view, w wVar, a aVar) {
        e0 e0Var = this.q;
        RecyclerView recyclerView = e0Var.a;
        if (recyclerView != null) {
            int[] a = e0Var.a(recyclerView.getLayoutManager(), view);
            int i = a[0];
            int i2 = a[1];
            int ceil = (int) Math.ceil(((double) g(Math.max(Math.abs(i), Math.abs(i2)))) / 0.3356d);
            if (ceil > 0) {
                aVar.b(i, i2, ceil, this.j);
            }
        }
    }

    public float f(DisplayMetrics displayMetrics) {
        return 100.0f / ((float) displayMetrics.densityDpi);
    }
}
